import React, { useState } from 'react';
import { DatePicker, Radio, Button } from 'antd';
const { RangePicker } = DatePicker;
import Crumbs from '../../components/crumbs/index';
import './scss/account.scss'
const Account = (props) => {
    const [CrumbsList] = useState([
        {
            name: '财务管理',
        },
        {
            name: '对账单管理',
            url: '/account',
        },
    ]);

    const [bill, setBill] = React.useState('all');
    const [datas, setData] = React.useState('alls');
    const onBill = (e) => {
        console.log(e.target.value);
        setBill(e.target.value);
    };
    const onData = (e) => {
        console.log(e.target.value);
        setData(e.target.value);
    };
    return (
        <div>
            <Crumbs CrumbsList={CrumbsList} />
            <div className="account_box">
                <div className="account_text">
                    <span>下载对账单</span>
                    <span>每日9:00前完成数据更新，当前数据更新至 2020-08-13</span>
                    <span>微信在次日9点启动生成前一天的对账单，建议商户10点后再获取；</span>
                    <span>对账单中涉及金额的字段单位为“元”。</span>
                    <span>下载账单接口为单日期接口，请尽量保持账单时间段不要过长。</span>
                </div>
            </div>
            <div>
                <div>
                    账单类型
                    <Radio.Group onChange={onBill} value={bill}>
                        <Radio value={'all'}>所有账单</Radio>
                        <Radio value={'pay'}>支付账单</Radio>
                        <Radio value={'refund'}>退款账单</Radio>
                    </Radio.Group>
                </div>
                <div>
                    数据类型
                    <Radio.Group onChange={onData} value={datas}>
                        <Radio value={'alls'}>所有账单</Radio>
                        <Radio value={'pays'}>仅商城账单</Radio>
                    </Radio.Group>
                </div>
            </div>
            <div>
                <RangePicker />
            </div>
            <div>
                <Button>下载对账单</Button> 
            </div>
        </div>
    )
}

export default Account;